<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    // constructor  单词 构造函数

function Ren(two,one){
  this.two = two;
  this.one = one;
}
Ren.prototype.sing=function(){
  console.log('唱歌');
}
const  rr=new Ren('两只手','一个头')
 console.log(Ren.prototype);
rr.sing()

console.log(Ren.prototype.constructor===Ren);
function Pig(uname,age){
  this.uname = uname;
  this.age = age;
}
Pig.prototype.sing=function(){
  console.log('哼哼');
}

const pq=new Pig('佩奇','15')
 console.log(Pig.prototype);
pq.sing()
    //
  </script>
</body>

</html>